//
//  TankSprite.h
//  lust
//
//  Created by fan on 13-4-2.
//
//

#import "CCSprite.h"
#import "cocos2d.h"
typedef enum
{
    kUp=1,
    kLeft,
    kRight,
    kDown,
    kFire,
    kStay,
}TankAction;

@interface TankSprite : CCSprite
{
    TankAction kAct;
    CCLayer* gLayer;
    bool bIsEnemy;
    float runSpeed,turnSpeed,moveStep;
    int nRandomActionCount;
}
@property (nonatomic,readwrite,assign)TankAction kAct;
@property(nonatomic,readwrite,assign)bool bIsEnemy;
+(id)TankWithinLayer:(CCLayer*)layer imageFile:(NSString*)imgFile;
-(void)setLayer:(CCLayer*)layer;
-(void)TankInit;
-(void)MoveLeft:(CCLayer*)layer;
-(void)MoveRight:(CCLayer*)layer;
-(void)MoveUp:(CCLayer*)layer;
-(void)MoveDown:(CCLayer*)layer;
-(void)OnFire:(CCLayer*)layer;
-(void)OnStay:(CCLayer*)layer;

-(void)Activate;
-(void)DoRandomAction;
-(void)KeepPlay;
-(void)Kill;

-(void)CheckExplosion;
@end
